package fun.chutianshu;

public class Poison implements ChangeLife{

    private int pp;

    public Poison(int pp) {
        this.pp = pp;
    }
    public Poison(){}

    public int getPp() {
        return pp;
    }

    public void setPp(int pp) {
        this.pp = pp;
    }

    @Override
    public void changeHp(Pet pet) {
        int hp = pet.getHp();
        pet.setHp(hp-this.pp);
        System.out.println(pet.getName()+"吃了毒药，掉血"+this.pp+"点，剩余血量:"+pet.getHp());
    }
}
